Decompiled Node-Files
(Path in San Andreas)

visit the great article @ www.gtamodding.com!

----------------------------------------------

In this article i want to help you understanding decompiled NODE-Files.

What do you need?

Thats hard to say. First you should understand a little bit of geometry and mathmatics and then 
I would say if you havent heard anything of programming yet than you will only ask "WHAT THE ****?!". 
So if you realy want to understand decompiled Node-Files you should be able to know how to read informations 
from a binary file. Because NODES*.dat are binary files and you have to decompile them in your own program. 
I dont want to explain how you do this, I just want to give you an overview over SA Path and how they work.


----------------------------------------------

Lets start with the binary structure of Compiled Node-Files.

Node-Files are build in sections.
These Sections are:

###########################################
Header		- File-Information
Section 1 	- Car-Nodes
Section 1b	- PED-Nodes (Pedestrains)
Section 2	- Navi-Nodes
Section 3	- Links
Section 4	- Unused (Only "Filler")
Section 5	- Navi-Links
Section 6	- Link-Length
###########################################

The Header looks like this:

###########################################
UINT32		- Nodes-Count
UINT32		- Car-Nodes-Count
UINT32		- PED-Nodes-Count
UINT32		- Navi-Nodes
UINT32		- Link-Count
###########################################

The Nodes-Count tells you how many Nodes are in Section 1 ab Section 1b.
Car-Nodes-Count are the car nodes in Section 1 and PED-Nodes-Count the PED-Nodes in Section 1b.
So we can say: Car-Nodes-Count + PED-Nodes-Count = Nodes-Count.

The Navi-Nodes-Count tells us how many Navi-Nodes are placed in Section 2.
And last but not least the Link-Count is the Number of Links in the Node-File.
The Link-Count must be same in Sections 3/5/6!!!

Section 1 and 1b are including the points where objects are placed, the other sections
are used to influence where the car/pedestrian should move and how this should be done.

